<?php
/**
 * 我的收藏夹
 * 
 * @version        $Id: mystow.php 1 8:38 2010年7月9日Z tianya $
 * @package        DedeCMS.Member
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once(dirname(__FILE__)."/config.php");
CheckRank(0,0);
require_once(DEDEINC."/datalistcp.class.php");
setcookie("ENV_GOBACK_URL",GetCurUrl(),time()+3600,"/");

$menutype_son = 'down';

$mystowdata = $dsql->GetOne("SELECT COUNT(distinct s.arcid) as num FROM `#@__member_operation` s,`#@__archives` tp,`#@__addonsoft` addon where s.arcid=tp.id and tp.id=addon.aid and s.mid='".$cfg_ml->M_ID."'  and s.product='archive' and  (s.vip=1 or s.money=0)");
$mystownum = $mystowdata['num'];

$sql= "select distinct s.arcid,tp.*,addon.* from `#@__member_operation` s,`#@__archives` tp,`#@__addonsoft` addon where s.arcid=tp.id and tp.id=addon.aid and s.mid='".$cfg_ml->M_ID."' and s.product='archive' and  (s.vip=1 or s.money=0)  order by s.mtime desc";

$dl = new DataListCP();
$dl->pageSize = 5;

$dl->SetTemplate(DEDEMEMBER."/templets/down.htm");
$dl->SetSource($sql);

$dl->Display();
$dl->Close();
//print_r($dl);